/*
 * XML Type:  SellOption
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.SellOption
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML SellOption(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class SellOptionImpl extends net.ofx.types.x2003.x04.impl.AbstractInvestmentSellTransactionImpl implements net.ofx.types.x2003.x04.SellOption
{
    
    public SellOptionImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName OPTSELLTYPE$0 = 
        new javax.xml.namespace.QName("", "OPTSELLTYPE");
    private static final javax.xml.namespace.QName SHPERCTRCT$2 = 
        new javax.xml.namespace.QName("", "SHPERCTRCT");
    private static final javax.xml.namespace.QName RELFITID$4 = 
        new javax.xml.namespace.QName("", "RELFITID");
    private static final javax.xml.namespace.QName RELTYPE$6 = 
        new javax.xml.namespace.QName("", "RELTYPE");
    private static final javax.xml.namespace.QName SECURED$8 = 
        new javax.xml.namespace.QName("", "SECURED");
    
    
    /**
     * Gets the "OPTSELLTYPE" element
     */
    public net.ofx.types.x2003.x04.OptionSellEnum.Enum getOPTSELLTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(OPTSELLTYPE$0, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.OptionSellEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "OPTSELLTYPE" element
     */
    public net.ofx.types.x2003.x04.OptionSellEnum xgetOPTSELLTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.OptionSellEnum target = null;
            target = (net.ofx.types.x2003.x04.OptionSellEnum)get_store().find_element_user(OPTSELLTYPE$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "OPTSELLTYPE" element
     */
    public void setOPTSELLTYPE(net.ofx.types.x2003.x04.OptionSellEnum.Enum optselltype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(OPTSELLTYPE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(OPTSELLTYPE$0);
            }
            target.setEnumValue(optselltype);
        }
    }
    
    /**
     * Sets (as xml) the "OPTSELLTYPE" element
     */
    public void xsetOPTSELLTYPE(net.ofx.types.x2003.x04.OptionSellEnum optselltype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.OptionSellEnum target = null;
            target = (net.ofx.types.x2003.x04.OptionSellEnum)get_store().find_element_user(OPTSELLTYPE$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.OptionSellEnum)get_store().add_element_user(OPTSELLTYPE$0);
            }
            target.set(optselltype);
        }
    }
    
    /**
     * Gets the "SHPERCTRCT" element
     */
    public java.lang.String getSHPERCTRCT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SHPERCTRCT$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "SHPERCTRCT" element
     */
    public net.ofx.types.x2003.x04.SharesPerType xgetSHPERCTRCT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SharesPerType target = null;
            target = (net.ofx.types.x2003.x04.SharesPerType)get_store().find_element_user(SHPERCTRCT$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "SHPERCTRCT" element
     */
    public void setSHPERCTRCT(java.lang.String shperctrct)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SHPERCTRCT$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SHPERCTRCT$2);
            }
            target.setStringValue(shperctrct);
        }
    }
    
    /**
     * Sets (as xml) the "SHPERCTRCT" element
     */
    public void xsetSHPERCTRCT(net.ofx.types.x2003.x04.SharesPerType shperctrct)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SharesPerType target = null;
            target = (net.ofx.types.x2003.x04.SharesPerType)get_store().find_element_user(SHPERCTRCT$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.SharesPerType)get_store().add_element_user(SHPERCTRCT$2);
            }
            target.set(shperctrct);
        }
    }
    
    /**
     * Gets the "RELFITID" element
     */
    public java.lang.String getRELFITID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RELFITID$4, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "RELFITID" element
     */
    public net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType xgetRELFITID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType target = null;
            target = (net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType)get_store().find_element_user(RELFITID$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "RELFITID" element
     */
    public boolean isSetRELFITID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(RELFITID$4) != 0;
        }
    }
    
    /**
     * Sets the "RELFITID" element
     */
    public void setRELFITID(java.lang.String relfitid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RELFITID$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(RELFITID$4);
            }
            target.setStringValue(relfitid);
        }
    }
    
    /**
     * Sets (as xml) the "RELFITID" element
     */
    public void xsetRELFITID(net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType relfitid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType target = null;
            target = (net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType)get_store().find_element_user(RELFITID$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType)get_store().add_element_user(RELFITID$4);
            }
            target.set(relfitid);
        }
    }
    
    /**
     * Unsets the "RELFITID" element
     */
    public void unsetRELFITID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(RELFITID$4, 0);
        }
    }
    
    /**
     * Gets the "RELTYPE" element
     */
    public net.ofx.types.x2003.x04.RelatedEnum.Enum getRELTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RELTYPE$6, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.RelatedEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "RELTYPE" element
     */
    public net.ofx.types.x2003.x04.RelatedEnum xgetRELTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RelatedEnum target = null;
            target = (net.ofx.types.x2003.x04.RelatedEnum)get_store().find_element_user(RELTYPE$6, 0);
            return target;
        }
    }
    
    /**
     * True if has "RELTYPE" element
     */
    public boolean isSetRELTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(RELTYPE$6) != 0;
        }
    }
    
    /**
     * Sets the "RELTYPE" element
     */
    public void setRELTYPE(net.ofx.types.x2003.x04.RelatedEnum.Enum reltype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RELTYPE$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(RELTYPE$6);
            }
            target.setEnumValue(reltype);
        }
    }
    
    /**
     * Sets (as xml) the "RELTYPE" element
     */
    public void xsetRELTYPE(net.ofx.types.x2003.x04.RelatedEnum reltype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RelatedEnum target = null;
            target = (net.ofx.types.x2003.x04.RelatedEnum)get_store().find_element_user(RELTYPE$6, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.RelatedEnum)get_store().add_element_user(RELTYPE$6);
            }
            target.set(reltype);
        }
    }
    
    /**
     * Unsets the "RELTYPE" element
     */
    public void unsetRELTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(RELTYPE$6, 0);
        }
    }
    
    /**
     * Gets the "SECURED" element
     */
    public net.ofx.types.x2003.x04.SecuredEnum.Enum getSECURED()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SECURED$8, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.SecuredEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "SECURED" element
     */
    public net.ofx.types.x2003.x04.SecuredEnum xgetSECURED()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SecuredEnum target = null;
            target = (net.ofx.types.x2003.x04.SecuredEnum)get_store().find_element_user(SECURED$8, 0);
            return target;
        }
    }
    
    /**
     * True if has "SECURED" element
     */
    public boolean isSetSECURED()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(SECURED$8) != 0;
        }
    }
    
    /**
     * Sets the "SECURED" element
     */
    public void setSECURED(net.ofx.types.x2003.x04.SecuredEnum.Enum secured)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SECURED$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SECURED$8);
            }
            target.setEnumValue(secured);
        }
    }
    
    /**
     * Sets (as xml) the "SECURED" element
     */
    public void xsetSECURED(net.ofx.types.x2003.x04.SecuredEnum secured)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SecuredEnum target = null;
            target = (net.ofx.types.x2003.x04.SecuredEnum)get_store().find_element_user(SECURED$8, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.SecuredEnum)get_store().add_element_user(SECURED$8);
            }
            target.set(secured);
        }
    }
    
    /**
     * Unsets the "SECURED" element
     */
    public void unsetSECURED()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(SECURED$8, 0);
        }
    }
}
